package com.longshihan.news.ui.main.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Gravity;
import android.view.Window;
import android.view.WindowManager;

import com.longshihan.news.control.KeepLiveActivityManager;
import com.longshihan.news.util.ZLog;

/**
 * 1像素的activity
 */
public class KeepLiveActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.activity_keep_live);
        Window window = getWindow();
        window.setGravity(Gravity.LEFT|Gravity.TOP);
        WindowManager.LayoutParams params = window.getAttributes();
        params.height = 1;
        params.width = 1;
        params.x = 0;
        params.y = 0;

        window.setAttributes(params);

        KeepLiveActivityManager.getInstance(this).setKeepLiveActivity(this);

    }
    @Override
    protected void onDestroy() {
        // TODO Auto-generated method stub
        super.onDestroy();
        ZLog.i("KeepLiveActivity----onDestroy!!!");
    }
}
